package design_pattern.ReadWriteLock;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/4 13:42
 * @Version 1.0
 * 这个设计模式有两个名词：ReadWriteLock design pattern / Reader-Writer design pattern
 *
 */
public class ReadWriteLockClient {
    public static void main(String[] args) {
        final ShareDate shareDate = new ShareDate(10);
        new ReadWorker(shareDate).start();
        new ReadWorker(shareDate).start();
        new ReadWorker(shareDate).start();
        new ReadWorker(shareDate).start();
        new ReadWorker(shareDate).start();
        new WriteWork(shareDate,"efghigklmnssdsds").start();
        new WriteWork(shareDate,"efghigklsdaamn").start();

    }
}
